package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CreditWaterActivityParticipantMapper;
import com.ruoyi.system.domain.CreditWaterActivityParticipant;
import com.ruoyi.system.service.ICreditWaterActivityParticipantService;

/**
 * 护水活动参与记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-26
 */
@Service
public class CreditWaterActivityParticipantServiceImpl implements ICreditWaterActivityParticipantService
{
    @Autowired
    private CreditWaterActivityParticipantMapper creditWaterActivityParticipantMapper;

    /**
     * 查询护水活动参与记录
     * 
     * @param participantId 护水活动参与记录主键
     * @return 护水活动参与记录
     */
    @Override
    public CreditWaterActivityParticipant selectCreditWaterActivityParticipantByParticipantId(Long participantId)
    {
        return creditWaterActivityParticipantMapper.selectCreditWaterActivityParticipantByParticipantId(participantId);
    }

    /**
     * 查询护水活动参与记录列表
     * 
     * @param creditWaterActivityParticipant 护水活动参与记录
     * @return 护水活动参与记录
     */
    @Override
    public List<CreditWaterActivityParticipant> selectCreditWaterActivityParticipantList(CreditWaterActivityParticipant creditWaterActivityParticipant)
    {
        return creditWaterActivityParticipantMapper.selectCreditWaterActivityParticipantList(creditWaterActivityParticipant);
    }

    /**
     * 根据用户ID查询参与记录
     * 
     * @param userId 用户ID
     * @return 参与记录列表
     */
    @Override
    public List<CreditWaterActivityParticipant> selectCreditWaterActivityParticipantByUserId(Long userId)
    {
        return creditWaterActivityParticipantMapper.selectCreditWaterActivityParticipantByUserId(userId);
    }

    /**
     * 新增护水活动参与记录
     * 
     * @param creditWaterActivityParticipant 护水活动参与记录
     * @return 结果
     */
    @Override
    public int insertCreditWaterActivityParticipant(CreditWaterActivityParticipant creditWaterActivityParticipant)
    {
        return creditWaterActivityParticipantMapper.insertCreditWaterActivityParticipant(creditWaterActivityParticipant);
    }

    /**
     * 修改护水活动参与记录
     * 
     * @param creditWaterActivityParticipant 护水活动参与记录
     * @return 结果
     */
    @Override
    public int updateCreditWaterActivityParticipant(CreditWaterActivityParticipant creditWaterActivityParticipant)
    {
        return creditWaterActivityParticipantMapper.updateCreditWaterActivityParticipant(creditWaterActivityParticipant);
    }

    /**
     * 批量删除护水活动参与记录
     * 
     * @param participantIds 需要删除的护水活动参与记录主键
     * @return 结果
     */
    @Override
    public int deleteCreditWaterActivityParticipantByParticipantIds(Long[] participantIds)
    {
        return creditWaterActivityParticipantMapper.deleteCreditWaterActivityParticipantByParticipantIds(participantIds);
    }

    /**
     * 删除护水活动参与记录信息
     * 
     * @param participantId 护水活动参与记录主键
     * @return 结果
     */
    @Override
    public int deleteCreditWaterActivityParticipantByParticipantId(Long participantId)
    {
        return creditWaterActivityParticipantMapper.deleteCreditWaterActivityParticipantByParticipantId(participantId);
    }
} 